<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>搜索结果</title>
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <link rel="stylesheet" href="/js/bootstrap/css/bootstrap.min.css">
    <script src="/js/jquery/jquery.min.js"></script>
    <script src="/js/bootstrap/js/bootstrap.min.js"></script>
    <link rel="stylesheet" href="/css/font/css/font-awesome.min.css" />
    <link rel="stylesheet" href="/css/reset.css" />
    <link rel="stylesheet" href="/css/message.css" />
    <script src="/js/plugins/jrender/jrender.min.js"></script>
    <script src="/js/common.js"></script>

</head>
<body">

<div class="search-head">
    <div class="row nav-search">
        <div class="col">
            <a href="javascript:history.go(-1);">
                <span><i class="fa fa-chevron-left"></i></span>
            </a>
        </div>
        <div class="col">
            <span>搜索结果</span>
        </div>
        <div class="col"></div>
        <div class="col"></div>
    </div>
</div>

<div class="container">
    <div id="result">
        <div render-loop="travels">
            <dd class="itemList" style="height: 30px">
                <a href="/travelPage.html?id=" render-fun="setHref" render-key="travels.id">
                    <span style="color: #6f42c1">游记&nbsp;&nbsp;&nbsp;&nbsp;</span>
                    <span render-html="travels.title"></span>
                </a>
            </dd>
        </div>
        <div render-loop="strategies">
            <dd class="itemList" style="height: 30px">
                <a href="/strategyCatalogs.html?id=" render-fun="setHref" render-key="strategies.id">
                    <span style="color: #6f42c1">攻略&nbsp;&nbsp;&nbsp;&nbsp;</span>
                    <span render-html="strategies.title"></span>
                </a>
            </dd>
        </div>
    </div>

    <div>
        <dl class="itemList">
            <dd>
                <p style="color: #6f42c1"><span class="fa fa-hand-o-up"></span>&nbsp;&nbsp;搜索的内容都在里面啦~&nbsp;&nbsp;<span class="fa fa-hand-o-up"></span></p>
            </dd>
        </dl>
    </div>
</div>

<script>

    var resultStr = sessionStorage.getItem("result");
    var result;
    if(resultStr){
        result = JSON.parse(resultStr);
        console.log(result);
    }
    $("#result").renderValues(result, {
        setHref: setHref
    })

</script>
</body>
</html>